home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Tools 2
/
Amiga Tools 2.iso
/
tex
/
macros
/
base
/
tracefnt.sty
< prev
next >
Wrap
Text File
|
1995-03-15
|
8KB
|
256 lines
%%
%% This is file `tracefnt.sty', generated
%% on <1994/12/17> with the docstrip utility (2.2i).
%%
%% The original source files were:
%%
%% tracefnt.dtx (with options: `package,trace')
%%
%% Copyright 1994 the LaTeX3 project and the individual authors.
%% All rights reserved. For further copyright information see the file
%% legal.txt, and any other copyright indicated in this file.
%%
%% This file is part of the LaTeX2e system.
%% ----------------------------------------
%%
%% This system is distributed in the hope that it will be useful,
%% but WITHOUT ANY WARRANTY; without even the implied warranty of
%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
%%
%%
%% IMPORTANT NOTICE:
%%
%% For error reports in case of UNCHANGED versions see bugs.txt.
%%
%% Please do not request updates from us directly. Distribution is
%% done through Mail-Servers and TeX organizations.
%%
%% You are not allowed to change this file.
%%
%% You are allowed to distribute this file under the condition that
%% it is distributed together with all files mentioned in manifest.txt.
%%
%% If you receive only some of these files from someone, complain!
%%
%% You are NOT ALLOWED to distribute this file alone. You are NOT
%% ALLOWED to take money for the distribution or use of either this
%% file or a changed version, except for a nominal charge for copying
%% etc.
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{tracefnt}[1994/11/18 v2.3m
Standard LaTeX package (font tracing)]
%%% File: tracefnt
%% Copyright (C) 1989-94 by Frank Mittelbach and Rainer Sch\"opf.
%% Copyright (C) 1994 by LaTeX3 project. All rights reserved.
\newcount\tracingfonts
\tracingfonts=0
\DeclareOption{errorshow}{%
\def\@font@info##1{%
\GenericInfo{(Font)\@spaces\@spaces\@spaces\space\space}%
{LaTeX Font Info: \space\space\space##1}}%
\def\@font@warning##1{%
\GenericInfo{(Font)\@spaces\@spaces\@spaces\space\space}%
{LaTeX Font Warning: ##1}}%
}
\DeclareOption{warningshow}{%
\def\@font@info##1{%
\GenericInfo{(Font)\@spaces\@spaces\@spaces\space\space}%
{LaTeX Font Info: \space\space\space##1}}%
\def\@font@warning##1{%
\GenericWarning{(Font)\@spaces\@spaces\@spaces\space\space}%
{LaTeX Font Warning: ##1}}%
}
\DeclareOption{infoshow}{%
\def\@font@info##1{%
\GenericWarning{(Font)\@spaces\@spaces\@spaces\space\space}%
{LaTeX Font Info: \space\space\space##1}}%
\def\@font@warning##1{%
\GenericWarning{(Font)\@spaces\@spaces\@spaces\space\space}%
{LaTeX Font Warning: ##1}}%
}
\DeclareOption{loading}{%
\tracingfonts\tw@
}
\DeclareOption{debugshow}{%
\ExecuteOptions{infoshow}%
\tracingfonts\thr@@
}
\DeclareOption{pausing}{%
\def\@font@warning##1{%
\GenericError
{(Font)\@spaces\@spaces\@spaces\space\space}%
{LaTeX Font Warning: ##1}%
{See the LaTeX Companion for details.}%
{I'll stop for every LaTeX Font Warning because
you requested\\the `pausing' option
to the tracefnt package.}}%
}
\ExecuteOptions{infoshow}
\ProcessOptions
\def\extract@font{%
\get@external@font
\global\expandafter\font\font@name\external@font\relax
\ifnum \tracingfonts >\@ne
\@font@info{External font `\external@font'
loaded as\MessageBreak \font@name}\fi
\font@name \relax
\csname \f@encoding+\f@family\endcsname
\csname\curr@fontshape\endcsname
\relax
}
\DeclareRobustCommand\selectfont
{%
\ifx\f@linespread\baselinestretch \else
\set@fontsize\baselinestretch\f@size\f@baselineskip \fi
\xdef\font@name{%
\csname\curr@fontshape/\f@size\endcsname}%
\pickup@font
\font@name
\ifnum \tracingfonts>\tw@
\@font@info{Switching to \font@name}\fi
\size@update
\enc@update
}
\def\set@fontsize#1#2#3{%
\@defaultunits\@tempdimb#2pt\relax\@nnil
\edef\f@size{\strip@pt\@tempdimb}%
\@defaultunits\@tempskipa#3pt\relax\@nnil
\edef\f@baselineskip{\the\@tempskipa}%
\edef\f@linespread{#1}%
\let\baselinestretch\f@linespread
\def\size@update{%
\baselineskip\f@baselineskip\relax
\baselineskip\f@linespread\baselineskip
\normalbaselineskip\baselineskip
\setbox\strutbox\hbox{%
\vrule\@height.7\baselineskip
\@depth.3\baselineskip
\@width\z@}%
\ifnum \tracingfonts>\tw@
\ifx\f@linespread\@empty
\let\reserved@a\@empty
\else
\def\reserved@a{\f@linespread x}%
\fi
\@font@info{Changing size to \f@size/\reserved@a
\f@baselineskip}%
\aftergroup\type@restoreinfo \fi
\let\size@update\relax}%
}
\let\size@update\relax
\def\type@restoreinfo{%
\ifx\f@linespread\@empty
\let\reserved@a\@empty
\else
\def\reserved@a{\f@linespread x}%
\fi
\@font@info{Restoring size to
\f@size/\reserved@a\f@baselineskip}}
\def\glb@settings{%
\expandafter\ifx\csname S@\f@size\endcsname\relax
\calculate@math@sizes
\fi
\csname S@\f@size\endcsname
\ifmath@fonts
\ifnum \tracingfonts>\tw@
\@font@info{Setting up math fonts for
\f@size/\f@baselineskip}\fi
\begingroup
\escapechar\m@ne
\csname mv@\math@version \endcsname
\globaldefs\@ne
\math@fonts
\let \glb@currsize \f@size
\endgroup
\the\every@math@size
\else
\ifnum \tracingfonts>\tw@
\@font@info{No math setup for
\f@size/\f@baselineskip}\fi
\fi
}
\def\check@mathfonts{%
\ifx \glb@currsize \f@size
\ifnum \tracingfonts>\thr@@
\@font@info{*** MATH: no change \f@size\space
curr/global (\curr@math@size/\glb@currsize)}\fi
\else
\ifnum \tracingfonts>\thr@@
\@font@info{*** MATH: setting up \f@size\space
curr/global (\curr@math@size/\glb@currsize)}\fi
\glb@settings
\if@inmath
\aftergroup\restglb@settings
\else
\ifnum \tracingfonts>\thr@@
\@font@info{*** MATH: no resetting (not in
nested math)}\fi
\fi
\fi
\let\curr@math@size\f@size
\@inmathtrue
}
\def\restglb@settings{%
\ifnum \tracingfonts>\thr@@
\@font@info{*** MATH: restoring}\fi
\begingroup
\let\f@size\curr@math@size
\ifx\glb@currsize \f@size
\ifnum \tracingfonts>\thr@@
\@font@info{*** MATH: ... already okay (\f@size)}\fi
\else
\ifnum \tracingfonts>\thr@@
\@font@info{*** MATH: ... to \f@size}\fi
\glb@settings
\fi
\endgroup
}
\def\use@mathgroup#1#2{\relax\ifmmode
\ifnum \tracingfonts>\tw@
\count@#2\relax
\@font@info{Using \noexpand\mathgroup
(\the\count@) #2}\fi
\math@bgroup
\expandafter\ifx\csname M@\f@encoding\endcsname#1\else
#1\fi
\mathgroup#2\relax
\expandafter\math@egroup\fi}%
\ifx\math@bgroup\begingroup
\def\math@egroup#1{#1\endgroup
\ifnum \tracingfonts>\tw@
\@font@info{Restoring \noexpand\mathgroup
(\ifnum\mathgroup=\m@ne default\else \the\mathgroup \fi)%
}\fi}
\fi
\def\getanddefine@fonts#1#2{%
\ifnum \tracingfonts>\tw@
\count@#1\relax
\@font@info{\noexpand\mathgroup (\the\count@) #1 :=\MessageBreak
\string#2 \tf@size/\sf@size/\ssf@size}\fi
\xdef\font@name{\csname \string#2/\tf@size\endcsname}%
\pickup@font \let\textfont@name\font@name
\xdef\font@name{\csname \string#2/\sf@size\endcsname}%
\pickup@font \let\scriptfont@name\font@name
\xdef\font@name{\csname \string#2/\ssf@size\endcsname}%
\pickup@font
\edef\math@fonts{\math@fonts
\textfont#1\textfont@name
\scriptfont#1\scriptfont@name
\scriptscriptfont#1\font@name}%
}
%% this could be replaced by \try@size@range making the subst slower!
\def\execute@size@function#1{%
\@ifundefined{s@fct@#1}%
{\errmessage{Undefined font size function #1}%
\s@fct@}%
{\csname s@fct@#1\endcsname}%
}
\def\fontsubfuzz{0pt}
%%\subst@size %% coded inline
%%\def\subst@size{%
%%}
\endinput
%%
%% End of file `tracefnt.sty'.